package com.sky.service.user;

import com.sky.dto.NotifyDto;
import com.sky.dto.PayDto;
import com.sky.pojo.Orders;
import com.sky.result.Result;

import java.io.IOException;

public interface WxPayService {
    /**
     * 完成小程序的下单
     * @param dto
     * @return
     */
    Result<String> payment(PayDto dto) throws Exception;

    /**
     * 二维码支付通知回调
     * @param notifyDto
     */
    void handleNotify(NotifyDto notifyDto);

    /**
     * 查询订单
     * @param orders
     * @return
     * @throws Exception
     */
    public Boolean QueryOrder(Orders orders) throws Exception;

    /**
     * 关闭订单
     * @param orderNum
     * @throws Exception
     */
    public void CloseOrder(String orderNum) throws Exception;

    /**
     * 订单退款接口
     * @param orders
     */
    public void refunds(Orders orders, String cancelReson) throws IOException;
}
